/**
 * Created by Administrator on 2017/7/21.
 */
var xh = window.location.search.slice(4);

var h = $(window).height();
$('.colFlex').css('height', h - 20 + 'px');
$(window).resize(function(){
    h = $(window).height();
    $('.colFlex').css('height', h - 20 + 'px');
})
$.ajax({
    type: 'get',
    url: baseUrl + 'publicInfo/tzxq',
    data: {
        xh: xh
    },
    beforeSend: function(){
        Loading();
    },
    success: function(response){
        closeLoading();
        if(response.responseCode == '1000'){
            if(response.content.length > 0){
                var text = response.content[0].tgxx;
                text = text.replace(/\\n|\\r/g, '</p><p>');
                text = '<p>' + text + '</p>';
                if(response.content[0].wllj){
                    $('.content').append('<h4>' + response.content[0].tgbt + '</h4><h6><span>作者：<b>' + response.content[0].jyxm + '</b></span>&nbsp&nbsp&nbsp<span>来源：<b>' + response.content[0].lsdw + '</b></span>&nbsp&nbsp&nbsp<span>时间：<b>' + response.content[0].scsj + '</b></span></h6><a href="' + response.content[0].wllj + '" target="_blank"><img src="' + response.content[0].wllj + '" alt="图片丢失" ></a>'+ text);
                } else {
                    $('.content').append('<h4>' + response.content[0].tgbt + '</h4><h6><span>作者：<b>' + response.content[0].jyxm + '</b></span>&nbsp&nbsp&nbsp<span>来源：<b>' + response.content[0].lsdw + '</b></span>&nbsp&nbsp&nbsp<span>时间：<b>' + response.content[0].scsj + '</b></span></h6>' + text);
                }
            } else {
                $('#ulList').css('display','none');
                Msg('暂无数据');
            }
        } else {
            $('#ulList').css('display','none');
            Msg();
        }
    },
    error: function(){
        closeLoading();
        Msg();
    }
})